#include<iostream>
#include<string>
#include<cmath>
using namespace std;
#define sz size()

int value (string num, int base) {
  int res = 0;
  for (int i=num.sz-1, j=0; i>=0; i--, j++) {
    res += (num[i]-'0') * pow((double)base, (double)j) ;
  }
  return res;
}
int main(){
  int ans = value("56",13);
  cout<<ans<<endl;
  return 0;
}
